package cn.dai.service;

import cn.dai.dao.UserRoleMapDao;
import cn.dai.pojo.UserRoleMap;

import java.util.List;

/**
 * @author ArkD42
 * @file RBAC
 * @create 2020 - 06 - 13 - 21:58
 */
public class UserRoleMapServiceImpl implements UserRoleMapService {

    UserRoleMapDao userRoleMapDao;

    public UserRoleMapServiceImpl(UserRoleMapDao userRoleMapDao) {
        this.userRoleMapDao = userRoleMapDao;
    }

    @Override
    public UserRoleMap getAvailableRidByUid(Integer id) {
        return userRoleMapDao.queryUrMapByUidAndStatus1(id);
    }

    @Override
    public List<UserRoleMap> getThisUidAllRoles(Integer id) {
        return userRoleMapDao.queryUrMapByUid(id);
    }

}
